package com.caigou.mapper.cms;

import com.caigou.bean.cms.entity.Picture;
import com.caigou.bean.cms.param.PictureQueryParam;
import com.caigou.bean.cms.param.PictureRecycleQueryParam;
import com.caigou.bean.cms.param.PictureUseParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PictureMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Picture picture);

    int insertSelective(Picture picture);

    Picture selectByPrimaryKey(Integer id);

    int updateByPrimaryKey(Picture picture);

    List<Picture> queryPicture(@Param("folderId")Integer folderId, @Param("keyword")String keyword);

    List<Picture> queryPictureByPath(@Param("path")String path, @Param("keyword")String keyword);

    List<Picture> advancedQueryPictureByPath(PictureQueryParam pictureQueryParam);

    int updatePicture(Picture picture);

    int getPictureCount(@Param("folderId")Integer folderId);

    Long getPictureTotalSize();

    int updatePictureUse(PictureUseParam pictureUseParam);

    List<Picture> queryPictureInRecycle(PictureRecycleQueryParam pictureRecycleQueryParam);

    List<Integer> listPictureIdInRecycle();
}